<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ES6</title>
</head>
<body>

<!--const命令-->
<!--const pi = 3.1415926;-->
<!--pi = 3-->

         <!--字符串的拓展-->
<!--   <p id="result"></p>-->
<!--   <script>-->
<!--     let basket = {-->
<!--     count: 100,-->
<!--     onSale: 80-->
<!--   }-->
<!--     document.getElementById('result').innerHTML =-->
<!--     'There are <b>' + basket.count + '</b> ' +-->
<!--     'items in your basket, ' +-->
<!--     '<em>' + basket.onSale +-->
<!--     '</em> are on sale!';-->
<!-- </script>-->

<!--<p id="result"></p>-->
<script>
    // let basket = {
    //     count:100,
    //     onSale:80
    // }
    // document.getElementById('result').innerHTML =
    //     `There are <b>${basket.count}</b> items
    //      in your basket, <em>${basket.onSale}</em>
    //     are on sale!`;


    // console.log(...[1, 2, 3])
    // 1 2 3

    // console.log(1, ...[2, 3, 4], 5)
// 1 2 3 4 5

        // [...document.querySelectorAll('div')]
    // [<div>, <div>, <div>]

    //fill()方法
    var a=['a','b','c']
    a.fill(7)
    console.log(a)
</script>
</body>
</html>